package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
/**出库记录类*/
@Data
@ApiModel(value = "出库记录类")
@TableName("t_outrecord")
public class OutRecordBean {
    /**出库记录编号*/
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_outRecordId",type = IdType.AUTO)
    private Integer id;
    /**订单编号*/
    @ApiModelProperty(value = "订单编号")
    @TableField("fk_orderId")
    private Integer orderId;
    /**商品编号*/
    @ApiModelProperty(value = "商品编号")
    @TableField("fk_goodsId")
    private Integer goodsId;
    /**出库数量*/
    @ApiModelProperty(value = "出库数量")
    @TableField("or_num")
    private Integer num;
    /**出库时间*/
    @ApiModelProperty(value = "出库时间")
    @TableField("or_date")
    private LocalDate createDate = LocalDate.now();

    public OutRecordBean() {
    }

    public OutRecordBean(Integer orderId, Integer goodsId, Integer num, LocalDate createDate) {
        this.orderId = orderId;
        this.goodsId = goodsId;
        this.num = num;
        this.createDate = createDate;
    }

    public OutRecordBean(Integer orderId, Integer goodsId, Integer num) {
        this.orderId = orderId;
        this.goodsId = goodsId;
        this.num = num;
    }

    @Override
    public String toString() {
        return "\nOutRecordBean{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", goodsId=" + goodsId +
                ", num=" + num +
                ", createDate=" + createDate +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }
}
